package com.huilian.iotbox.data.enums;

import lombok.Getter;

/**
 * SPF纸钞机
 * @author chenqiwen
 * @CreateDate: 2021-05-13-13-50
 * @Description:
 */
@Getter
public enum ExternalDeviceSPFEnum {

    QUERY_LINK("01", "01F0", "11", "查找纸币器是否连接"),
    SET_UP_THE_COMMUNICATION_PROTOCOL_VERSION("0206", "01F0", "06","设置通讯协议版本"),
    READ_THE_CONFIGURATION_OF_BANKNOTE_DEVICE_CHANNEL("01", "1FF0", "05","读取纸币器通道配置情况"),
    SETTINGS_ALLOW_RECOGNITION_OF_BANKNOTES("03%sFF00", "01F0", "02","设置允许识别哪几种纸币"),
    ALLOWED_TO_WORK("01", "01F0", "0A","允许纸币器识别纸币（使能）"),
    WAITING_FOR_RECEIPT_OF_OTES_00("01", "01F0", "07","等待接收纸币"),
    WAITING_FOR_RECEIPT_OF_OTES_80("01", "03F0", "07","等待接收纸币"),
    COINING("01", "03F0", "07","压币"),
    REJECT("01", "03F0", "08","拒收纸币"),
    RECOGNIZE_NOTE("", "03F0EF", "03F0EF","识别到纸币"),
    SUCCESSFUL_RECEIPT_OF_BANKNOTES("", "04F0EE", "","收钞票成功，作为是否收币成功的关键因素"),
    SUCCESSFUL_RECEIPT_OF_BANKNOTES_2("", "05F0EE", "","收钞票成功，作为是否收币成功的关键因素"),
    BANK_NOTE_COLLECTION_COMPLETED("", "03F0CCEB", "","收钞票完成，不作为是否收币成功的关键因素"),
    CLOSE("", "02F0E8", "E8","纸币器处于关闭状态，纸币在收币时或者其他异常时会返回这个状态，如果待机时返回这个状态需要重新向纸币器发送0x0A Enable 命令"),

    ;

    // 协议-发送
    private String sendTCP;
    // 协议-回答
    private String answerTCP;
    // 功能码
    private String CMD;
    private String desc;

    ExternalDeviceSPFEnum(String sendTCP, String answerTCP, String CMD, String desc) {
        this.sendTCP = sendTCP;
        this.answerTCP = answerTCP;
        this.CMD = CMD;
        this.desc = desc;
    }
}
